package com.gujia.designpattern.proxysrc;

import java.lang.reflect.Method;

public class SelfPrintHandler implements InvocationHandler{

    private Object target;

    public SelfPrintHandler(Object target) {
        this.target = target;
    }

    @Override
    public void invoke(Object o, Method method) throws Exception{
        System.out.println("----------before------------");
        method.invoke(target);
        System.out.println("----------after-------------");
    }
}
